﻿
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="Keywords"
    content="完美世界通行证,完美世界账号,注册完美通行证,登录完美世界账号,完美世界会员中心,完美账号挂失,修改密码,完美世界账号安全,完美世界密保工具,密保卡,手机令牌,完美神盾,完美充值管理,完美充值记录,完美点券,绑定手机,绑定邮箱" />
<meta name="Description"
    content="完美世界是一家网络游戏研发、运营、销售和服务公司，以自主原创为根本、以精品游戏研发为宗旨、以中国文化推广为目标，致力于为全球用户提供优质的互联网娱乐服务。完美娱乐，世界同享！" />
<title>注册账号 - 完美世界通行证</title>
<link rel="stylesheet" href="/public/home/Css/style.css" />
<link rel="stylesheet" href="/public/home/Css/dota2.css" />

</head>
<body>
   
    <div class="as_register">
        <div class="lan_tab">
            <a class="ch" locale="zh-CN" href="javascript:void(0);">简体中文</a><i>|</i><a
                class="en" locale="en" href="javascript:void(0);">English</a>
        </div>
        <div class="as_wrap ">
            <a class="logo" href="javascript:void(0);"></a>
           
<div id="tabCh" class="lan_tabpage tabch">
    <h2 class="tit">免费注册完美通行证</h2>
    <p class="vicetit">创建完美世界账号，抢先享受全方位的游戏服务</p>
    <div class="func_tab cl">
        <!-- <a href="javascript:void(0);">手机注册<i></i></a> -->
        <!-- <a href="javascript:void(0);">邮箱注册 <i></i></a> -->
    </div>
 
    
    <!-- //中文邮箱注册 -->
    <div class="func_tabpage">
        <form action="{{url('/register')}}" method="post" autocomplete="off">
            <input type="hidden" name="from" value="2" />
            <div class="ibox mb17">
                <input name="email" class="t_email" type="text" placeholder="邮箱地址" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
                <span class="ihint ihint_success" style="display: block;"></span>
            </div>
            <div class="ibox ibox_eye">
                <label class="pwshow" for="">密码（由6-16位英文字母及数字组成）</label>
                <input name="password" class="pwhide" type="password" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="pwlevel">
                <ul class="cl pwLv" style="display: none;">
                    <li class="l cur"><span>低</span></li>
                    <li class="m"><span>中</span></li>
                    <li class="h"><span>高</span></li>
                </ul>
            </div>
            <div class="ibox ibox_eye mb34">
                <!-- <input class="pwshow" type="text" placeholder="重复密码" /> -->
                <label class="pwshow" for="">重复密码</label>
                <input name="repeat" class="pwhide" type="password" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="ibox mb17">
                <input name="truename" type="text" placeholder="真实姓名" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="ibox mb17">
                <input name="id_card" type="text" placeholder="身份证" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            
            <div class="cl vbox">
                <div class="fl vboxl">
                    <div class="ibox">
                        <input name="rand" type="text" placeholder="验证码" /> 
                        <i></i>
                         <span class="ihint ihint_error" style="display: none;"></span>
                       
                    </div>
                </div>
                <div class="fl vboxr">
                    <img src="/vcode" onclick="this.src=this.src+'?a=1'">
                </div> 
            </div>

            <div class="cbox">
                <input class="acceptcb" type="checkbox" checked="checked" />
                <i class="check"></i>
                <span>我接受<a target="_blank" href="http://static.wanmei.com/passport/agreement/003.html">《完美通行证用户协议》</a></span>
            </div>
           <!-- <a class="rbtn_com rbtn_s1 mb15" href="javascript:void(0);" onclick="checkin(this)">免费注册通行证</a> -->
            <button type="submit" style="width:450px" class="rbtn_com rbtn_s1 mb15"  onclick="checkin(this)">免费注册通行证</button>
            <a style="width:450px" class="rbtn_com rbtn_s2" >已经有通行证了？</a>
           {{csrf_field()}}
        </form>
    </div>
    <div class="layer_verify" style="display: none;">
        <span class="close"></span>
        <div class="libox">
            <input name="randimgipt" type="text" placeholder="输入验证码" />
        </div>
        <div class="lvbox">
            <img class="randimg" src="" alt="" />
            <span class="refreshimg">换一张</span>
        </div>
        <a class="rbtn_com rbtn_s1 sendmobilecode" href="javascript:void(0);">确认发送</a>
    </div>
</div>


<div id="tabEn" class="lan_tabpage taben">
    <h2 class="tit">Sign up for free</h2>
    <p class="vicetit">Enjoy perfect game service by creating Perfect World account</p>
    <div class="func_tab cl">
        <!-- <a href="javascript:void(0);"> Phone <i></i></a> -->
        <!-- <a href="javascript:void(0);">Email (Recommended)<i></i></a> -->
    </div>
    <div class="func_tabpage">
        <form action="" autocomplete="off">
            <input type="hidden" name="from" value="2" />
            <div class="ibox mb17">
                <input name="email" class="t_phone" type="text" placeholder="Phone number" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="ibox ibox_eye">
                <label class="pwshow" for="">Password(Must be 6-16 letters or numbers)</label>
                <input name="password" class="pwhide" type="password" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="pwlevel">
                <ul class="cl pwLv" style="display: none;">
                    <li class="l cur"><span>low</span></li>
                    <li class="m"><span>medium</span></li>
                    <li class="h"><span>high</span></li>
                </ul>
            </div>
            <div class="ibox ibox_eye mb34">
                <label class="pwshow" for="">Repeat password</label>
                <input name="repeat" class="pwhide" type="password" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="ibox mb17">
                <input name="truename" type="text" placeholder="Real Name" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="ibox mb17">
                <input name="id_card" type="text" placeholder="ID Number" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="cl vbox">
                <div class="fl vboxl">
                    <div class="ibox">
                        <input name="rand" type="text" placeholder="Verification Code " /> 
                        <i></i>
                    </div>
                </div>
                <div class="fl vboxr">
                    <a class="getMobileRand" text="Send again" href="javascript:void(0);"> Get Verification Code</a>
                </div>
            </div>
            <div class="cbox">
                <input class="acceptcb" type="checkbox" checked="checked" />
                <i class="check"></i>
                <span>I accept to <a target="_blank" href="http://static.wanmei.com/passport/agreement/003.html">Terms and Data Policy of Wanmei Passport</a></span>
            </div>
            <a class="rbtn_com rbtn_s1 mb15" href="javascript:void(0);" onclick="checkin(this)">Sign up for Free!</a>
            <a class="rbtn_com rbtn_s2" href="http://members.dota2.com.cn/info"> Already have a Wanmei Passport?</a>
        </form>
    </div>
    <div class="func_tabpage">
        <form action="" autocomplete="off">
            <input type="hidden" name="from" value="2" />
            <div class="ibox mb17">
                <input name="email" class="t_email" type="text" placeholder="Email" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="ibox ibox_eye">
                <label class="pwshow" for="">Password(Must be 6-16 letters or numbers)</label>
                <input name="password" class="pwhide" type="password" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="pwlevel">
                <ul class="cl pwLv" style="display: none;">
                    <li class="l cur"><span>low</span></li>
                    <li class="m"><span>medium</span></li>
                    <li class="h"><span>high</span></li>
                </ul>
            </div>
            <div class="ibox ibox_eye mb34">
                <label class="pwshow" for="">Repeat password</label>
                <input name="repeat" class="pwhide" type="password" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="ibox mb17">
                <input name="truename" type="text" placeholder="Real Name" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            <div class="ibox mb17">
                <input name="id_card" type="text" placeholder="ID Number" /> 
                <i></i>
                <span class="ihint ihint_error" style="display: none;"></span>
            </div>
            
             <div class="cl vbox">
                <div class="fl vboxl">
                    <div class="ibox">
                        <input name="rand" type="text" placeholder="Identifying code" /> 
                        <i></i>
                         <span class="ihint ihint_error" style="display: none;"></span>
                       
                    </div>
                </div>
                <div class="fl vboxr">
                    <img src="/vcode" onclick="this.src=this.src+'?a=1'">
                </div> 
            </div>
            <div class="cbox">
                <input class="acceptcb" type="checkbox" checked="checked" />
                <i class="check"></i>
                <span>I accept to <a target="_blank" href="http://static.wanmei.com/passport/agreement/003.html">Terms and Data Policy of Wanmei Passport</a></span>
            </div>
            <a class="rbtn_com rbtn_s1 mb15" href="javascript:void(0);" onclick="checkin(this)">Sign up for Free!</a>
            <a class="rbtn_com rbtn_s2" href="http://members.dota2.com.cn/info"> Already have a Wanmei Passport?</a>
        </form>
    </div>
    <div class="layer_verify" style="display: none;">
        <span class="close"></span>
        <div class="libox">
            <input name="randimgipt" type="text" placeholder="Verification Code" />
        </div>
        <div class="lvbox">
            <img class="randimg" src="" alt="" />
            <span class="refreshimg">Change</span>
        </div>
        <a class="rbtn_com rbtn_s1 sendmobilecode" href="javascript:void(0);">Submit</a>
    </div>
</div>

        </div>
    </div>
    <div style="display:none" 
    id="niubidetankuang"
    error="{!! session('error') !!}"
    success="{!! session('success') !!}"
    >
</div>
    <script src="/public/home/Scripts/jquery.min.js" type="text/javascript"></script>
    <script src="/public/home/Scripts/is.min.js" type="text/javascript"></script>
    <script src="/public/home/Scripts/register.js" type="text/javascript"></script>
    <script src="/public/home/Scripts/common.js" type="text/javascript"></script>
    























<script type="text/javascript">

function refreshRandImg(node) {
    node.attr('src', 'http://captchas.wanmei.com/various_captcha/wanmei_captcha?appId=f3ba1af9293e48a08d96a7128ed6dfb8&r='+ Math.random());
    $('input[name="randimgipt"]').val('');
}
function sendEmailCode(node){
    var emailinput = $(node).closest('form').find('input[name="email"]');
    emailinput.blur();
    if(!emailinput.hasError()){
        trackEvent('1102','get_mobile_code');
        $(node).sendCode('/reg/sendemail', {'email':emailinput.val()}, function(data){
            alert(data.message);
        });
    }
}
/*
    提交信息验证
*/
function checkin(node){
    var formnode = $(node).closest('form');
    var param = formnode.serialize();

    //  $.post('/register',param,function(data){
    //     if(data.code==0){
    //         location.href = "/reg/success?s=dota2";
    //     }else{
    //         alert(data.message);
    //     }
    // },'json');



    // if(!formnode.find('.acceptcb').prop("checked")){
    //     alert(msgNoAccept[getLocale()]);
    //     return;
    // }

    // if(formnode.find('input[name="repeat"]').val() != formnode.find('input[name="password"]').val()){
    //     alert(msgInvalidPwdRepeat[getLocale()]);
    //     return;
    // }

   
    
}

$(function() {
    $('.layer_verify .refreshimg').click(function(){
        refreshRandImg($(this).prevAll('.randimg'));
    });
    $('.getMobileRand').click(function(){
        if($(this).hasClass('btn_disable')) return;
        var emailinput = $(this).closest('form').find('input[name="email"]');
        emailinput.blur();
        if(!emailinput.hasError()){
            var randNode = $(this).closest('.lan_tabpage').find('.layer_verify');
            refreshRandImg(randNode.find('.randimg'));
            randNode.show();
        }
    });
    $('.sendmobilecode').click(function(){
        trackEvent('1102','get_mobile_code');
        var self = this;
        var sendBtnNode = $(this).closest('.lan_tabpage').find('.getMobileRand');
        if(sendBtnNode.hasClass('btn_disable')){
            $(self).closest('.layer_verify').hide();
            return;
        }
        var randInput = $(this).closest('.layer_verify').find('input[name="randimgipt"]');
        var emailinput = sendBtnNode.closest('form').find('input[name="email"]');
        $(this).sendCode('/reg/sendmobile', {'mobile':emailinput.val(), 'rand':randInput.val()}, function(data){
            if(data.code==0){
                $(self).closest('.layer_verify').hide();
            }else{
                alert(data.message);
                refreshRandImg($(self).closest('.layer_verify').find('.randimg'));
            }
        }, sendBtnNode);
    });
    $('.layer_verify .close').click(function(){
        $(this).closest('.layer_verify').hide();
    });
    //验证邮箱
    $('input[name="email"]').blur(function(){
        var v = $(this).val();
        if(is.empty(v)){
            $(this).showCueMessage(msgNoEmpty[getLocale()],false);
            
            return;

        }
        
        if($(this).hasClass('t_email')){
            if(!is.email(v)){
                $(this).showCueMessage(msgInvalidEmail[getLocale()],false);
                return;
            }
         }
        //验证该邮箱是否已经注册
        var self = this;
        $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
        });
        $.post("/register/checkuser",{email:v},function(data){
            if(data == 0){
              
                $(self).showCueMessage(msgSuccessEmail[getLocale()],true);

            }else {
                $(self).showCueMessage(msgNoEmail[getLocale()],false);
            }
        });

    });

    $('input[name="password"]').keyup(function(){
        $(this).passwordLevel();
    });
    $('input[name="password"]').blur(function(){
        $(this).passwordLevel();
    });
    $('input[name="repeat"]').blur(function(){
        if($(this).val() == $(this).closest('form').find('input[name="password"]').val()){
            $(this).showCueMessage('',true);
        }else{
            $(this).showCueMessage(msgInvalidPwdRepeat[getLocale()],false);
        }
    });
    //验证真实姓名
    $('input[name="truename"]').blur(function(){
        var v = $(this).val();
        if(is.empty(v)){
            $(this).showCueMessage(msgNoEmpty[getLocale()],false);
            return;
        }
        if(checkTruename(v)){
            $(this).showCueMessage('',true);
        }else{
            $(this).showCueMessage(msgInvalidTruename[getLocale()],false);
        }
    });

    //检测验证码
    $('input[name="rand"]').blur(function(){
        
        var v = $(this).val();
        if(is.empty(v)){

            $(this).showCueMessage(msgNoEmpty[getLocale()],false);
            return;
        }
    //检测验证码是否正确
        var self = this;
        $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
        });


        $.get("/register/checkVcode",{vcode:v},function(data){
            if(data == 1){
                // alert('11111');
                // console.log(data);      
                $(self).showCueMessage(msgSuccessVcode[getLocale()],true);

            }else{
                // alert('2222222');
            
                $(self).showCueMessage(msgNoVcode[getLocale()],false);
            }
        });
    });
   
       

    $('input[name="id_card"]').blur(function(){
        var v = $(this).val();
        if(is.empty(v)){
            $(this).showCueMessage(msgNoEmpty[getLocale()],false);
            return;
        }
        if(checkid_card(v)==0){
            if(isTeenager(v)){
                $(this).showCueMessage(msgTeenager[getLocale()],true);
            }else{
                $(this).showCueMessage('',true);
            }
        }else{
            $(this).showCueMessage(msgInvalidid_card[getLocale()],false);
        }
    });
  //手机或邮箱注册切换
    $(".lan_tabpage.tabch").tabOn({
        toggleClass: "cur",
        menu : ".func_tab a",
        box : ".func_tabpage"
    });
    $(".lan_tabpage.taben").tabOn({
        toggleClass: "cur",
        menu : ".func_tab a",
        box : ".func_tabpage",
        page : 1
    });

    //模拟input placeholder属性
    $(":text").placeholder();

    //密码提示及输入切换 
    //其中提示用label而不是input，是避免切换时输入太快 缺失输入内容
    var pwShow = $(".pwshow"),
        pwHide = $(".pwhide"),
        pwtxt = [];
    var len = pwShow.length;
    //label提示
    for(var m=0; m<len; m++){
        pwtxt.push($(pwShow[m]).html());
    }

    var iSp = function isSupport(){
        if("placeholder" in document.createElement("input")){
            return true;
        }else{
            return false;
        }   
    }
    
    pwShow.click(function(){
        $(this).hide().siblings("input").show().focus();
    });
    pwHide.blur(function(){
        if($(this).val()==""){
            $(this).hide().siblings("label").show();
            $(".ibox").removeClass("onfocus");
        }
    });

    //模拟input checkbox样式及功能
    $(".cbox i").click(function(){
        $(this).toggleClass("check");
        //$(this).siblings("input").click();
        if($(this).hasClass("check")){
            $(this).siblings("input").prop("checked","checked");
            //console.log($(this).siblings("input").prop("checked"));
        }else{
            $(this).siblings("input").removeAttr("checked");
        }
    });

    //当input有内容时才展示右侧小图标
    $(".ibox input").keyup(function(){
        if($(this).val()!=""){
            $(this).siblings("i").show();
        }else{
            $(this).siblings("i").hide();
        }
    });

    
    //点击input右侧叉号图标，则删除input值，重现显示提示语，并获得焦距
    $(".ibox i").click(function(){
        $(".ibox").removeClass("onfocus");
        $(this).parent().addClass("onfocus");
        if(!$(this).parent().hasClass("ibox_eye")){
            var temp1 = $(this).siblings("input"),
                placeholder = temp1.attr("placeholder");
            if(iSp()){
                temp1.val("").focus();
            }else{
                temp1.val(placeholder).focus();
            }
        }else{
            $(this).siblings(".pwhide").focus();
        }
    });

    //长按input右侧眼睛图标，则展示明文密码
    $(".ibox_eye i").mousedown(function(){
        //$(this).siblings(".pwhide").attr("type","text").addClass("on");
        $(this).addClass("icolt");
        $(this).siblings(".pwshow").html($(this).siblings(".pwhide").val()).addClass("txtlt").show();
        $(this).siblings(".pwhide").hide();
    });

    //鼠标弹起，则显示暗文密码，且该input获得焦距
    // ie cannot change input type automatically and ie7 refresh has problem
    $(".ibox_eye i").each(function(index){
        $(this).mouseup(function(){
            $(this).removeClass("icolt");
            var temp2 = $(this).siblings(".pwshow"),
                temp2V = temp2.val();
            if(temp2V!=temp2.html(pwtxt[index])){
                temp2.html(pwtxt[index]).removeClass("txtlt");
            }
            $(this).siblings(".pwshow").hide();
            $(this).siblings(".pwhide").show().focus;
        });
    });

    $(".ibox input").focus(function(){
        $(".ibox").removeClass("onfocus");
        $(this).parent().addClass("onfocus");
    });
});

$(function(){
        var error = $('#niubidetankuang').attr('error');
        var success = $('#niubidetankuang').attr('success');
        if(error != '')
            alert(error);
        if(success != '')
            alert(success); 
    })

</script>
    <script src="/public/home/Scripts/passport_bottom.js"></script>
    <script type="./text/javascript" src="/public/home/Scripts/stat.js"></script>
</body>
</html>